//Copyright © 2012 Ryan Larson, Ben Glasser
//[This program is licensed under the "GPL v3.0 License"]
// Please see the file COPYING in the source
//distribution of this software for license terms.

package org.app_chat.service.protobuf;

import com.google.protobuf.Message;

/**
 * Copyright (c) 2012 Ryan Larson, Ben Glasser
 * Created by Ryan of app-chat.org
 * on: 7/11/12 at 10:58 AM
 */
public class MessageMarshaller {

    /**
     * This method will serialize an {@link com.google.protobuf.Message} into a byte[] array
     *
     * @param messsage Any {@link com.google.protobuf.Message}
     * @return A byte[] array representing the Message.
     */

    public byte[] marshall(Message messsage) {
        return messsage.toByteArray();
    }
}
